package cn.iocoder.yudao.module.asasc.controller.admin.campaign.vo;

import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;

@Schema(description = "管理后台 - 广告数据 Response VO")
@Data
@ExcelIgnoreUnannotated
public class CampaignDataRespVO {

    @Schema(description = "id", requiredMode = Schema.RequiredMode.REQUIRED, example = "14541")
    @ExcelProperty("id")
    private Long id;

    @Schema(description = "日期")
    @ExcelProperty("日期")
    private LocalDate date;

    @Schema(description = "国家")
    @ExcelProperty("国家")
    private String countryOrRegion;
    @Schema(description = "组织 ID", example = "26593")
    @ExcelProperty("账号ID")
    private Long orgId;
    @Schema(description = "应用 ID", example = "25557")
    @ExcelProperty("应用ID")
    private Long adamId;
    @Schema(description = "应用名称", example = "张三")
    @ExcelProperty("应用名称")
    private String appName;
    @Schema(description = "展示次数")
    @ExcelProperty("展示次数")
    private Integer impressions;

    @Schema(description = "点击次数")
    @ExcelProperty("点击次数")
    private Integer taps;

    @Schema(description = "总安装次数")
    @ExcelProperty("总安装")
    private Integer installs;

    @Schema(description = "新安装次数")
    @ExcelProperty("新安装")
    private Integer newDownloads;

    @Schema(description = "重复安装次数")
    @ExcelProperty("重复安装")
    private Integer reDownloads;

    @Schema(description = "启用定位安装次数")
    private Integer latOnInstalls;

    @Schema(description = "禁用定位安装次数")
    private Integer latOffInstalls;

    @Schema(description = "点击率")
    @ExcelProperty("点击率")
    private BigDecimal ttr;

    @Schema(description = "每次转化费用")
    @ExcelProperty("转化费用")
    private BigDecimal avgCpaAmount;

    @Schema(description = "转化货币")
    private String avgCpaCurrency;

    @Schema(description = "每次点击付费")
    @ExcelProperty("点击付费")
    private BigDecimal avgCptAmount;

    @Schema(description = "点击货币")
    @ExcelProperty("点击货币")
    private String avgCptCurrency;

    @Schema(description = "每千次展示付费")
    @ExcelProperty("千展付费")
    private BigDecimal avgCpmAmount;

    @Schema(description = "展示货币")
    private String avgCpmCurrency;

    @Schema(description = "支出金额")
    @ExcelProperty("广告支出")
    private BigDecimal localSpendAmount;

    @Schema(description = "支出货币")
    @ExcelProperty("支出货币")
    private String localSpendCurrency;

    @Schema(description = "转化率")
    @ExcelProperty("转化率")
    private BigDecimal conversionRate;

    @Schema(description = "广告系列 ID", example = "24587")
    @ExcelProperty("广告系列ID")
    private Long campaignId;

    @Schema(description = "广告系列名称", example = "张三")
    @ExcelProperty("广告系列")
    private String campaignName;

    @Schema(description = "是否删除")
    private Boolean isDeleted;

    @Schema(description = "广告系统状态", example = "2")
    @ExcelProperty("广告系统状态")
    private String campaignStatus;

    @Schema(description = "状态", example = "2")
    @ExcelProperty("状态")
    private String servingStatus;

    @Schema(description = "国家或地区")
    private String countriesOrRegions;

    @Schema(description = "修改时间")
    @ExcelProperty("修改时间")
    private LocalDateTime modificationTime;

    @Schema(description = "日预算金额")
    @ExcelProperty("日预算金额")
    private Long dailyBudgetAmount;

    @Schema(description = "日预算货币")
    private String dailyBudgetCurrency;

    @Schema(description = "展示状态", example = "1")
    @ExcelProperty("展示状态")
    private String displayStatus;

    @Schema(description = "广告展示位置")
    @ExcelProperty("广告展示位置")
    private String supplySources;

    @Schema(description = "广告渠道类型", example = "2")
    @ExcelProperty("广告渠道类型")
    private String adChannelType;

    @Schema(description = "计费方式")
    @ExcelProperty("计费方式")
    private String billingEvent;

    @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("创建时间")
    private LocalDateTime createTime;

    //****************** 新增 AppStore Sales 字段 ************/
    /**
     * 订阅销售额
     */
    @Schema(description = "订阅销售额")
    @ExcelProperty("订阅销售额")
    private BigDecimal ascSales;
    /**
     * 订阅所得
     */
    @Schema(description = "订阅所得")
    @ExcelProperty("订阅所得")
    private BigDecimal ascProceeds;
    /**
     * 展示次数
     */
    @Schema(description = "展示次数")
    @ExcelProperty("展示次数")
    private Integer ascImpressions;
    /**
     * 点击次数
     */
    @Schema(description = "点击次数")
    @ExcelProperty("点击次数")
    private Integer ascTaps;

    /**
     * 首次安装次数
     */
    @Schema(description = "首次安装次数")
    @ExcelProperty("首次安装次数")
    private Integer ascInstalls;

    /**
     * 重新安装次数
     */
    @Schema(description = "重新安装次数")
    @ExcelProperty("重新安装次数")
    private Integer ascReInstalls;
    /**
     * 更新安装次数
     */
    @Schema(description = "更新安装次数")
    @ExcelProperty("更新安装次数")
    private Integer ascUptInstalls;
    /**
     * 点击率
     */
    @Schema(description = "点击率")
    @ExcelProperty("点击率")
    private BigDecimal ascTtr;
    /**
     * 转化率
     */
    @Schema(description = "转化率")
    @ExcelProperty("转化率")
    private BigDecimal ascConversionRate;
    /**
     * 试订数
     */
    @Schema(description = "试订数")
    @ExcelProperty("试订数")
    private Integer ascTrial;
    /**
     * 订阅数
     */
    @Schema(description = "订阅数")
    @ExcelProperty("订阅数")
    private Integer ascRenewal;
    /**
     * 退款数
     */
    @Schema(description = "退款数")
    @ExcelProperty("退款数")
    private Integer ascRefund;
    /**
     * 订阅退款销售额
     */
    @Schema(description = "订阅退款销售额")
    @ExcelProperty("订阅退款销售额")
    private BigDecimal ascRefundSales;
    /**
     * 订阅退款所得
     */
    @Schema(description = "订阅退款所得")
    @ExcelProperty("订阅退款所得")
    private BigDecimal ascRefundProceeds;

    /**
     * 自然新增=总首次安装-广告安装(经点击)
     */
    @Schema(description = "自然新增")
    @ExcelProperty("自然新增")
    private Integer naturallyInstalls;
    /**
     * 利润=订阅所得-订阅退款所得-广告支出
     */
    @Schema(description = "利润")
    @ExcelProperty("利润")
    private BigDecimal profit;
    /**
     * 试订率=新增用户/试订数
     */
    @Schema(description = "试订率")
    @ExcelProperty("试订率")
    private BigDecimal trialRate;
}